<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<script type="text/javascript" src="script/project.js"></script>-->
</head>
<body>
<div class="box">
      		<h4 class="white">
      			<span class="align-left">RA자산식별</span>
	      		<span class="align-right">마감상태(자산식별및평가) :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[1].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
	 <div class="box-container2" style="height: 471px; text-align: left">
 		<table class="table-short1" style="width: 340px; margin-left: 10px;">
   			<tfoot>
   				<tr>
   					<td>
                     	<div class="align-right">
                     	
                     		<c:choose>
	                       		<c:when test="${sessionScope.magamSession[1].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button" onclick="javascript: mraassetInsert()"><span>저장</span></a>
                     				<a href="#" class="button" onclick="javascript: riskICancleWrite('mraasset')"><span>닫기</span></a>
	                       		</c:when>
	                       		<c:otherwise>
	                       			<a href="#" class="button1 addMargin" onclick="return false;"><span>저장</span></a>
                  				   	<a href="#" class="button1 addMargin" onclick="return false;"><span>닫기</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
                     	</div>
                     </td>
   				</tr>
   				<tr><td class="spaceLine"></td></tr>
   			</tfoot>
   		</table>
   		<%--
   		<table class="insertTable" style="width: 380px">
	   			<tfoot>
	   				<tr>
	   					<td>
	                     	<div class="align-right"><a href="#" class="button" onclick="javascript:pjWrite();return false;"><span>등록</span></a>
	                     	<a href="#" class="button" onclick="javascript: canclePjWrite('mplist')"><span>취소</span></a></div>
	                     </td>
	   				</tr>
	   			</tfoot>
	   		</table>
   		 --%>
	 <div class="align-left">
		 <form action="riskIAction.do" method="post" name="mraasset">
			<input type="hidden" name="mode" value="mraasset_insert"></input>
			<input type="hidden" name="pro_id" id="pro_id" value="${sessionScope.lastProId }"></input>
	   		<table class="table-short1" style="width: 340px; margin-left: 10px;">
	   			<colgroup>
	   				<col width="55px"/>
	   				<col width="85px"/>
	   				<col width="100px"/>
	   				<col/>
	   				<col width="15px"/>
	   			</colgroup>
	   			<thead>
	   				<tr>
	   					<td class="col-chk"><input type='checkbox' name='checkAll' onclick="javascript: selectAll()" class="chkCursor"></input></td>
	   					<td class="col-rowspanMid">자산유형</td>
	   					<td>RA자산명칭</td>
	   					<td>정보매핑수</td>
	   					<td></td>
	   				</tr>
	   			</thead>
	   		</table>
	   		<div style="overflow:auto; overflow-x: hidden; width:350px; height: 350px;">
		   		<table class="table-short1" style="width: 340px; margin-left: 10px;">
		   			<colgroup>
		   				<col width="55px"/>
		   				<col width="85px"/>
		   				<col width="100px"/>
		   				<col/>
		   				<col width="15px"/>
		   			</colgroup>
		   			<tbody>
	      				<c:choose>
	                    	<c:when test="${fn:length(list)!= 0}">
	                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
                    			<%--
                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
                    			 --%>
                    			 <tr id="trArea${status.index+1 }" onclick="changeMappingTable('${list.raitem_nm}','${list.gub }');" <c:if test="${status.index%2==0 }">class="odd"</c:if>>
	                    			<td class="col-chk"><input type="checkbox" class="chkCursor" name="check" id="check${status.index+1 }" value='${list.raitem_nm }|${list.gub }'></input></td>
	                    			<td>
	                    				<div class="ellipsis"  style="width:100%;" title="${list.ak_nm2}">${list.ak_nm2}</div>
	                    			</td>
	                    			<td>
	                    				<div class="ellipsis"  style="width:100%;" title="${list.raitem_nm }">${list.raitem_nm }</div>
	                    			</td>
	                    			<td>
	                    				<div class="ellipsis"  style="width:100%;" title="${list.racontCount}">${list.racontCount}</div>
	                    			</td>
		   					 	<td></td>
	                    		</tr>
	                    	</c:forEach>
	                    	</c:when>
	                    	<c:otherwise>
	                    		<tr class="odd">
									<td colspan="5"  class="noDataTD">-데이터가 없습니다-</td>
								</tr>
	                    	</c:otherwise>
	                    	</c:choose>
	      			</tbody>
		   		</table>
	   		</div>
	   		<table class="table-short1" style="width: 340px; margin-left: 10px">
   				<thead>
   					<tr>
   						<td style="height: 25px ; vertical-align: middle; padding-left: 10px" valign="middle" >총 자산수 : ${requestScope.totalRacontCount }</td>
   					</tr>
   				</thead>
           </table>
   		</form>
   		</div>
   		 <div class="align-right">
   		 	<table class="table-short1" style="width: 340px; margin-right: 10px">
	   			<colgroup>
	   				<col width="85px"/>
	   				<col width="100px"/>
	   				<col width="25px"/>
	   				<col width="25px"/>
	   				<col width="25px"/>
	   				<col/>
	   				<col width="15px"/>
	   			</colgroup>
	   			<thead>
	   				<tr>
	   					<td style="padding-left: 10px;  padding-top: 7px; padding-bottom: 7px;">RA자산코드</td>
	   					<td>RA자산명칭</td>
	   					<td>C</td>
	   					<td>I</td>
	   					<td>A</td>
	   					<td>총점</td>
	   					<td></td>
	   				</tr>
	   			</thead>
	   		</table>
	   		<div id="changeMappingTableDiv" style="overflow:auto; overflow-x: hidden; width:350px; height: 350px;">
		   		 <table class="table-short1" style="width: 340px; margin-right: 10px">
	           		<tr class="odd">
						<td style="text-align: center; height: 35px ; vertical-align: middle;"  valign="middle">-정보 자산을 선택해주시기바랍니다-</td>
					</tr>
	           </table>
	   		</div>
   			<table class="table-short1" style="width: 340px; margin-right: 10px">
   				<thead>
   					<tr>
   						<td  style="height: 25px ; vertical-align: middle; padding-left: 10px" valign="middle" >매핑된 자산수 : <span id="totalMCount">0</span></td>
   					</tr>
   				</thead>
           </table>
   		 </div>
	</div>
</div>
</body>
</html>
